/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jmodcog2.fwd.ffn;

import jmodcog2.fwd.TrainedNet;

/**
 *
 * @author Mitch
 */
public class TrainedFeedFwdNet extends TrainedNet {

    public TrainedFeedFwdNet(FFNetConfig config) {
        super(config);
    }    

    @Override
    protected int _conn_index(int layer_i, int node_i, int node_j) {
        return conns_index0[layer_i] + this._get2D_n(node_i, node_j, num_nodes[layer_i + 1]);
    }

    @Override
    protected int _bias_index(int layer_j, int node_j) {
        if(biased) {
            if(shared_bias) {
                return layer_j - 1;
            } else {
                return _node_index(layer_j, node_j) - num_nodes[0];
            }
        }
        return -1;
    }
    
}
